-- GENERATED SPELL FOR [Thornvine Creeper] --


function spell0_23874(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(31287,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23874', 3500, 1)
end

function spell1_23874(pUnit, Event) --@Thorns,n/a--
pUnit:FullCastSpellOnTarget(33907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23874', 654, 1)
end

function Sorts_23874(pUnit, Event)
local choix_sorts_23874 = math.random(0, 1)
if choix_sorts_23874 == 0 then
pUnit:RegisterEvent('spell0_23874', 1, 1)
end
if choix_sorts_23874 == 1 then
pUnit:RegisterEvent('spell1_23874', 1, 1)
end
end

function mob23874_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23874', math.random(1500, 3000), 1)
end

function mob23874_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23874_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23874_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23874, 1, 'mob23874_Action')
RegisterUnitEvent(23874, 2, 'mob23874_Leave')
RegisterUnitEvent(23874, 3, 'mob23874_Kill')
RegisterUnitEvent(23874, 4, 'mob23874_Die')
